/*****************************************
 *  所有版权(c) 上海塔齐通讯技术有限公司       *
 *****************************************/
package com.touch.sysif.sms.api.model;

/**
 * 子短信
 * 
 * @version $Revision: 1.0 $ 
 * @author yanxiao
 * @date: Jan 17, 2014
 * @time: 10:18:54 PM
 */
public class SubSmsMessage  implements java.io.Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -2515421332629355998L;

	private String batchId;

    private String content;

    private String destAddr;

    private Short pkNumber;

    private Short pkTotal;

    private String sourceAddr;

    private int statusCode;

    public SubSmsMessage() {
    }

    public SubSmsMessage(
           String batchId,
           String content,
           String destAddr,
           Short pkNumber,
           Short pkTotal,
           String sourceAddr,
           int statusCode) {
           this.batchId = batchId;
           this.content = content;
           this.destAddr = destAddr;
           this.pkNumber = pkNumber;
           this.pkTotal = pkTotal;
           this.sourceAddr = sourceAddr;
           this.statusCode = statusCode;
    }


    /**
     * Gets the batchId value for this SubSmsMessage.
     * 
     * @return batchId
     */
    public String getBatchId() {
        return batchId;
    }


    /**
     * Sets the batchId value for this SubSmsMessage.
     * 
     * @param batchId
     */
    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }


    /**
     * Gets the content value for this SubSmsMessage.
     * 
     * @return content
     */
    public String getContent() {
        return content;
    }


    /**
     * Sets the content value for this SubSmsMessage.
     * 
     * @param content
     */
    public void setContent(String content) {
        this.content = content;
    }


    /**
     * Gets the destAddr value for this SubSmsMessage.
     * 
     * @return destAddr
     */
    public String getDestAddr() {
        return destAddr;
    }


    /**
     * Sets the destAddr value for this SubSmsMessage.
     * 
     * @param destAddr
     */
    public void setDestAddr(String destAddr) {
        this.destAddr = destAddr;
    }


    /**
     * Gets the pkNumber value for this SubSmsMessage.
     * 
     * @return pkNumber
     */
    public Short getPkNumber() {
        return pkNumber;
    }


    /**
     * Sets the pkNumber value for this SubSmsMessage.
     * 
     * @param pkNumber
     */
    public void setPkNumber(Short pkNumber) {
        this.pkNumber = pkNumber;
    }


    /**
     * Gets the pkTotal value for this SubSmsMessage.
     * 
     * @return pkTotal
     */
    public Short getPkTotal() {
        return pkTotal;
    }


    /**
     * Sets the pkTotal value for this SubSmsMessage.
     * 
     * @param pkTotal
     */
    public void setPkTotal(Short pkTotal) {
        this.pkTotal = pkTotal;
    }


    /**
     * Gets the sourceAddr value for this SubSmsMessage.
     * 
     * @return sourceAddr
     */
    public String getSourceAddr() {
        return sourceAddr;
    }


    /**
     * Sets the sourceAddr value for this SubSmsMessage.
     * 
     * @param sourceAddr
     */
    public void setSourceAddr(String sourceAddr) {
        this.sourceAddr = sourceAddr;
    }


    /**
     * Gets the statusCode value for this SubSmsMessage.
     * 
     * @return statusCode
     */
    public int getStatusCode() {
        return statusCode;
    }


    /**
     * Sets the statusCode value for this SubSmsMessage.
     * 
     * @param statusCode
     */
    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    @Override
	public String toString() {
		return "SubSmsMessage [batchId=" + batchId + ", content=" + content
				+ ", destAddr=" + destAddr + ", pkNumber=" + pkNumber
				+ ", pkTotal=" + pkTotal + ", sourceAddr=" + sourceAddr
				+ ", statusCode=" + statusCode + "]";
	}

	private Object __equalsCalc = null;
    public synchronized boolean equals(Object obj) {
        if (!(obj instanceof SubSmsMessage)) return false;
        SubSmsMessage other = (SubSmsMessage) obj;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.batchId==null && other.getBatchId()==null) || 
             (this.batchId!=null &&
              this.batchId.equals(other.getBatchId()))) &&
            ((this.content==null && other.getContent()==null) || 
             (this.content!=null &&
              this.content.equals(other.getContent()))) &&
            ((this.destAddr==null && other.getDestAddr()==null) || 
             (this.destAddr!=null &&
              this.destAddr.equals(other.getDestAddr()))) &&
            ((this.pkNumber==null && other.getPkNumber()==null) || 
             (this.pkNumber!=null &&
              this.pkNumber.equals(other.getPkNumber()))) &&
            ((this.pkTotal==null && other.getPkTotal()==null) || 
             (this.pkTotal!=null &&
              this.pkTotal.equals(other.getPkTotal()))) &&
            ((this.sourceAddr==null && other.getSourceAddr()==null) || 
             (this.sourceAddr!=null &&
              this.sourceAddr.equals(other.getSourceAddr()))) &&
            this.statusCode == other.getStatusCode();
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getBatchId() != null) {
            _hashCode += getBatchId().hashCode();
        }
        if (getContent() != null) {
            _hashCode += getContent().hashCode();
        }
        if (getDestAddr() != null) {
            _hashCode += getDestAddr().hashCode();
        }
        if (getPkNumber() != null) {
            _hashCode += getPkNumber().hashCode();
        }
        if (getPkTotal() != null) {
            _hashCode += getPkTotal().hashCode();
        }
        if (getSourceAddr() != null) {
            _hashCode += getSourceAddr().hashCode();
        }
        _hashCode += getStatusCode();
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(SubSmsMessage.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://sms.sysif.touch.com/api/model", "SubSmsMessage"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("batchId");
        elemField.setXmlName(new javax.xml.namespace.QName("", "batchId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("content");
        elemField.setXmlName(new javax.xml.namespace.QName("", "content"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("destAddr");
        elemField.setXmlName(new javax.xml.namespace.QName("", "destAddr"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("pkNumber");
        elemField.setXmlName(new javax.xml.namespace.QName("", "pkNumber"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "short"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("pkTotal");
        elemField.setXmlName(new javax.xml.namespace.QName("", "pkTotal"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "short"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sourceAddr");
        elemField.setXmlName(new javax.xml.namespace.QName("", "sourceAddr"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("statusCode");
        elemField.setXmlName(new javax.xml.namespace.QName("", "statusCode"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           String mechType,
           Class<?> _javaType,
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           String mechType,
           Class<?> _javaType,
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
